<template>
     <div class="header">
        <span class="iconfont icon-fanhui" v-if="showBack" @click="$router.back()"></span>
        <slot></slot>
    </div>
</template>

<script>
export default {
    name:"pageHeader",
    props:{
        showBack:{
            type:Boolean,
            default:false
        }
    },
}
</script>

<style lang="scss" scoped>
@import "../assets/css/comm.scss";
.header{
    height: .9rem;
    background-color: $primaryColor;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: relative;
    color: #ffffff;
    >span.icon-fanhui{
        position: absolute;
        left: .2rem;
    }
}
</style>
